function IContainerContract(container, item, options) {
  this._container = container;
  this._item = item;
  this._options = options;
  this._orderTrackId = (options && options.track) ? options.track : [];
  
  this._createElements();
};
IContainerContract.prototype._createElements = function() {
  var gui, div, table, mtr, mtd, input,  unique = MiscUtils.unique();
  DOMUtils.removeChildElements(this._container);
  
  var table = document.createElement('table');
  table.style.width = '860px';
  table.style.height = '160px';
  table.cellPadding = 0;
  table.cellSpacing = 0;
  this._container.appendChild(table);
  
  for (var i = 0, il = this._orderTrackId.length; i < il; i++) {
    tr = table.insertRow(-1);
    td = tr.insertCell(-1);
    td.style.verticalAlign = 'top';
    td.style.width = '860px';
    td.align = 'center';
    var itable = document.createElement('table');
    itable.style.width = '860px';
    itable.style.height = '30px';
    itable.cellPadding = 0;
    itable.cellSpacing = 0;
    td.appendChild(itable);
    
    itr = itable.insertRow(-1);
    itd = itr.insertCell(-1);
    itd.align = 'left';
    itd.style.verticalAlign = 'middle';
    itd.style.width = '860px';
    itd.style.height = '25px';
    
    var span = document.createElement('span');
    span.style.fontSize = '140%';
    span.style.fontWeight = 'bold';
    span.style.color = '#663333';
    span.id = unique + '_' + i + '_ordertype_div';
    itd.appendChild(span);
    var date = document.createElement('span');
    date.style.fontSize = '13px';
    date.id = unique + '_' + i + '_date_div';
    itd.appendChild(date);
    
    tr = table.insertRow(-1);
    td = tr.insertCell(-1);
    td.align = 'center';
    td.style.verticalAlign = 'middle';
    td.style.width = '860px';
    td.style.height = '40px';
    var ptable = document.createElement('table');
    ptable.style.width = '860px';
    ptable.style.height = '40px';
    ptable.cellPadding = 0;
    ptable.cellSpacing = 0;
    td.appendChild(ptable);
    
    ptr = ptable.insertRow(-1);
    ptd = ptr.insertCell(-1);
    ptd.style.width = '120px';
    ptd.style.textAlign = 'left';
    ptd.style.fontSize = '120%';
    ptd.style.color = '#663333';
    ptd.style.fontWeight = 'bold';
    ptd.style.verticalAlign = 'middle';
    ptd.appendChild(document.createTextNode('Photo Package'));
    ptd = ptr.insertCell(-1);
    ptd.style.width = '310px';
    ptd.style.textAlign = 'left';
    ptd.style.verticalAlign = 'middle';
    ptd.id = unique + '_' + i +  '_pp_div';
    ptd = ptr.insertCell(-1);
    ptd.style.width = '120px';
    ptd.style.textAlign = 'left';
    ptd.style.fontSize = '120%';
    ptd.style.color = '#663333';
    ptd.style.fontWeight = 'bold';
    ptd.style.verticalAlign = 'middle';
    ptd.appendChild(document.createTextNode('Video Package'));
    ptd = ptr.insertCell(-1);
    ptd.style.width = '310px';
    ptd.style.textAlign = 'left';
    ptd.style.verticalAlign = 'middle';
    ptd.id = unique + '_' + i + '_vp_div';
    
    tr = table.insertRow(-1);
    td = tr.insertCell(-1);
    td.align = 'center';
    td.style.verticalAlign = 'middle';
    td.style.width = '860px';
    td.style.height = '20px';
    var table1 = document.createElement('table');
    table1.style.width = '860px';
    table1.style.height = '20px';
    table1.cellPadding = 0;
    table1.cellSpacing = 0;
    td.appendChild(table1);
    
    tr1 = table1.insertRow(-1);
    td1 = tr1.insertCell(-1);
    td1.style.width = '860px';
    td1.style.height = '27px';
    td1.align = 'left';
    td1.style.fontSize = '130%';
    td1.style.color = '#663333';
    td1.style.fontWeight = 'bold';
    td1.style.verticalAlign = 'middle';
    td1.appendChild(document.createTextNode('Package Includes'));
    
    tr = table.insertRow(-1);
    td = tr.insertCell(-1);
    td.align = 'left';
    td.style.verticalAlign = 'middle';
    td.style.width = '860px';
    td.style.height = '40px';
    if (this._orderTrackId.length != 1) {
      td.style.padding = '0 0 0 20px';
    }
    var table2 = document.createElement('table');
    table2.style.width = '690px';
    table2.style.height = '40px';
    table2.id = unique + '_' + i + '_pProduct_div';
    table2.className = 'gbt';
    table2.cellSpacing = 0;
    table2.cellPadding = 0;
    td.appendChild(table2);
    
    var tr2 = table2.insertRow(-1);
    var td2 = tr2.insertCell(-1);
    td2.style.width = '410px';
    td2.style.height = '30px';
    td2.align = 'left';
    td2.style.verticalAlign = 'middle';
    td2.style.fontSize = '120%';
    td2.style.color = '#663333';
    td2.style.fontWeight = 'bold';
    td2.style.paddingLeft = '20px';
    td2.appendChild(document.createTextNode('Name '));
    
    var td2 = tr2.insertCell(-1);
    td2.style.width = '120px';
    td2.style.height = '30px';
    td2.align = 'center';
    td2.style.verticalAlign = 'middle';
    td2.style.fontSize = '120%';
    td2.style.color = '#663333';
    td2.style.fontWeight = 'bold';
    td2.appendChild(document.createTextNode('Qty '));
    
    var td2 = tr2.insertCell(-1);
    td2.style.width = '107px';
    td2.style.height = '30px';
    td2.align = 'left';
    td2.style.verticalAlign = 'middle';
    td2.style.fontSize = '120%';
    td2.style.color = '#663333';
    td2.style.fontWeight = 'bold';
    td2.style.paddingLeft = '30px';
    td2.appendChild(document.createTextNode('Unit '));
    
    tr = table.insertRow(-1);
    td = tr.insertCell(-1);
    td.align = 'center';
    td.style.verticalAlign = 'middle';
    td.style.width = '860px';
    td.style.height = '30px';
    var table3 = document.createElement('table');
    table3.style.width = '860px';
    table3.style.height = '30px';
    table3.cellPadding = 0;
    table3.cellSpacing = 0;
    td.appendChild(table3);
    
    tr3 = table3.insertRow(-1);
    td3 = tr3.insertCell(-1);
    td3.style.width = '860px';
    td3.style.height = '30px';
    td3.align = 'left';
    td3.style.fontSize = '130%';
    td3.style.color = '#663333';
    td3.style.fontWeight = 'bold';
    td3.style.verticalAlign = 'middle';
    td3.appendChild(document.createTextNode('Additions '));
    
    tr = table.insertRow(-1);
    td = tr.insertCell(-1);
    td.align = 'left';
    td.style.verticalAlign = 'middle';
    td.style.width = '860px';
    td.style.height = '40px';
    if (this._orderTrackId.length != 1) {
      td.style.padding = '0 0 0 20px';
    }
    var table4 = document.createElement('table');
    table4.style.width = '690px';
    table4.style.height = '40px';
    table4.className = 'gbt';
    table4.id = unique + '_' + i + '_additions_div';
    table4.cellPadding = 0;
    table4.cellSpacing = 0;
    td.appendChild(table4);
    
    var tr4 = table4.insertRow(-1);
    var td4 = tr4.insertCell(-1);
    td4.style.width = '410px';
    td4.style.height = '30px';
    td4.align = 'left';
    td4.style.verticalAlign = 'middle';
    td4.style.fontSize = '120%';
    td4.style.color = '#663333';
    td4.style.fontWeight = 'bold';
    td4.style.paddingLeft = '20px';
    td4.appendChild(document.createTextNode('Name '));
    
    var td4 = tr4.insertCell(-1);
    td4.style.width = '120px';
    td4.style.height = '30px';
    td4.align = 'center';
    td4.style.verticalAlign = 'middle';
    td4.style.fontSize = '120%';
    td4.style.color = '#663333';
    td4.style.fontWeight = 'bold';
    td4.appendChild(document.createTextNode('Qty '));
    
    var td4 = tr4.insertCell(-1);
    td4.style.width = '110px';
    td4.style.height = '30px';
    td4.align = 'left';
    td4.style.verticalAlign = 'middle';
    td4.style.fontSize = '120%';
    td4.style.color = '#663333';
    td4.style.fontWeight = 'bold';
    td4.style.paddingLeft = '30px';
    td4.appendChild(document.createTextNode('Unit '));
    
    tr = table.insertRow(-1);
    td = tr.insertCell(-1);
    td.align = 'center';
    td.style.verticalAlign = 'middle';
    td.style.width = '860px';
    td.style.height = '40px';
    var table5 = document.createElement('table');
    table5.style.width = '860px';
    table5.style.height = '40px';
    table5.cellPadding = 0;
    table5.cellSpacing = 0;
    td.appendChild(table5);
    
    tr5 = table5.insertRow(-1);
    td5 = tr5.insertCell(-1);
    td5.style.width = '860px';
    td5.style.height = '40px';
    td5.align = 'left';
    td5.style.fontSize = '130%';
    td5.style.fontWeight = 'bold';
    td5.style.color = '#663333';
    td5.style.verticalAlign = 'middle';
    td5.appendChild(document.createTextNode('Payment '));
    
    tr = table.insertRow(-1);
    td = tr.insertCell(-1);
    td.align = 'center';
    td.style.verticalAlign = 'middle';
    td.style.width = '860px';
    td.style.height = '80px';
    var table6 = document.createElement('table');
    table6.style.width = '860px';
    table6.style.height = '40px';
    table6.cellPadding = 0;
    table6.cellSpacing = 0;
    td.appendChild(table6);
    
    tr6 = table6.insertRow(-1);
    td6 = tr6.insertCell(-1);
    td6.style.width = '120px';
    td6.style.height = '30px';
    td6.align = 'left';
    td6.style.verticalAlign = 'middle';
    td6.style.fontSize = '120%';
    td6.style.color = '#663333';
    td6.style.fontWeight = 'bold';
    td6.appendChild(document.createTextNode('Price '));
    
    td6 = tr6.insertCell(-1);
    td6.style.width = '740px';
    td6.style.height = '30px';
    td6.align = 'left';
    td6.style.verticalAlign = 'middle';
    var table13 = document.createElement('table');
    table13.cellPadding = 0;
    table13.cellSpacing = 0;
    table13.style.width = '740px';
    table13.style.height = '30px';
    td6.appendChild(table13);
    tr13 = table13.insertRow(-1);
    td13 = tr13.insertCell(-1);
    td13.style.textAlign = 'left';
    td13.style.width = '740px';
    var span1 = document.createElement('span');
    span1.style.fontWeight = 'bold';
    span1.id = unique + '_' + i + '_price_div';
    td13.appendChild(span1);
    var span2 = document.createElement('span');
    span2.style.color = '#663333';
    span2.id = unique + '_' + i + '_discount_div';
    td13.appendChild(span2);
    
    tr6 = table6.insertRow(-1);
    td6 = tr6.insertCell(-1);
    td6.colSpan = 2;
    td6.align = 'center';
    td6.style.width = '860px';
    var table7 = document.createElement('table');
    table7.style.width = '860px';
    table7.style.height = '20px';
    table7.cellPadding = 0;
    table7.cellSpacing = 0;
    td6.appendChild(table7);
    
    tr7 = table7.insertRow(-1);
    td7 = tr7.insertCell(-1);
    td7.style.width = '860px';
    var table8 = document.createElement('table');
    table8.style.width = '860px';
    table8.style.height = '30px';
    table8.cellPadding = 0;
    table8.cellSpacing = 0;
    table8.id = unique + '_' + i + '_container1_div';
    td7.appendChild(table8); 
    
    tr8 = table8.insertRow(-1);
    td8 = tr8.insertCell(-1);
    td8.style.width = '120px';
    td8.style.height = '30px';
    td8.align = 'left';
    td8.style.fontSize = '10pt';
    td8.style.color = '#663333';
    td8.style.fontWeight = 'bold';
    td8.style.verticalAlign = 'middle';
    td8.appendChild(document.createTextNode(' Deposit'));
    td8 = tr8.insertCell(-1);
    td8.style.width = '740px';
    td8.style.height = '30px';
    td8.align = 'left';
    td8.style.verticalAlign = 'middle';
    td8.id = unique + '_' + i + '_pay1_div';
    
    tr7 = table7.insertRow(-1);
    td7 = tr7.insertCell(-1);
    td7.style.width = '860px';
    var table9 = document.createElement('table');
    table9.style.width = '860px';
    table9.style.height = '30px';
    table9.cellPadding = 0;
    table9.cellSpacing = 0;
    table9.id = unique + '_' + i + '_container2_div';
    td7.appendChild(table9); 
    
    tr9 = table9.insertRow(-1);
    td9 = tr9.insertCell(-1);
    td9.style.width = '120px';
    td9.style.height = '30px';
    td9.align = 'left';
    td9.style.fontSize = '10pt';
    td9.style.color = '#663333';
    td9.style.fontWeight = 'bold';
    td9.style.verticalAlign = 'middle';
    td9.appendChild(document.createTextNode('2'));
    var span = document.createElement('span');
    span.style.verticalAlign = 'super';
    span.style.fontSize = '80%';
    span.appendChild(document.createTextNode('nd'));
    td9.appendChild(span);
    td9.appendChild(document.createTextNode(' Payment'));
    td9 = tr9.insertCell(-1);
    td9.style.width = '740px';
    td9.style.height = '30px';
    td9.align = 'left';
    td9.style.verticalAlign = 'middle';
    td9.id = unique + '_' + i + '_pay2_div';
    
    tr7 = table7.insertRow(-1);
    td7 = tr7.insertCell(-1);
    td7.style.width = '860px';
    var table10 = document.createElement('table');
    table10.style.width = '860px';
    table10.style.height = '30px';
    table10.cellPadding = 0;
    table10.cellSpacing = 0;
    table10.id = unique + '_' + i + '_container3_div';
    td7.appendChild(table10); 
    
    tr10 = table10.insertRow(-1);
    td10 = tr10.insertCell(-1);
    td10.style.width = '120px';
    td10.style.height = '30px';
    td10.align = 'left';
    td10.style.fontSize = '10pt%';
    td10.style.color = '#663333';
    td10.style.fontWeight = 'bold';
    td10.style.verticalAlign = 'middle';
    td10.appendChild(document.createTextNode('3'));
    var span = document.createElement('span');
    span.style.verticalAlign = 'super';
    span.style.fontSize = '80%';
    span.appendChild(document.createTextNode('rd'));
    td10.appendChild(span);
    td10.appendChild(document.createTextNode(' Payment'));
    td10 = tr10.insertCell(-1);
    td10.style.width = '740px';
    td10.style.height = '30px';
    td10.align = 'left';
    td10.style.verticalAlign = 'middle';
    td10.id = unique + '_' + i + '_pay3_div';
    
    tr7 = table7.insertRow(-1);
    td7 = tr7.insertCell(-1);
    td7.style.width = '860px';
    var table11 = document.createElement('table');
    table11.style.width = '860px';
    table11.style.height = '30px';
    table11.cellPadding = 0;
    table11.cellSpacing = 0;
    table11.id = unique + '_' + i + '_container4_div';
    td7.appendChild(table11); 
    
    tr11 = table11.insertRow(-1);
    td11 = tr11.insertCell(-1);
    td11.style.width = '120px';
    td11.style.height = '30px';
    td11.align = 'left';
    td11.style.fontSize = '10pt';
    td11.style.color = '#663333';
    td11.style.fontWeight = 'bold';
    td11.style.verticalAlign = 'middle';
    td11.appendChild(document.createTextNode('4'));
    var span = document.createElement('span');
    span.style.verticalAlign = 'super';
    span.style.fontSize = '80%';
    span.appendChild(document.createTextNode('th'));
    td11.appendChild(span);
    td11.appendChild(document.createTextNode(' Payment'));
    td11 = tr11.insertCell(-1);
    td11.style.width = '740px';
    td11.style.height = '30px';
    td11.align = 'left';
    td11.style.verticalAlign = 'middle';
    td11.id = unique + '_' + i + '_pay4_div';
    
    tr = table.insertRow(-1);
    td = tr.insertCell(-1);
    td.align = 'center';
    td.style.verticalAlign = 'middle';
    td.style.width = '900px';
    td.style.height = '30px';
    var table14 = document.createElement('table');
    table14.style.width = '860px';
    table14.style.height = '30px';
    table14.cellPadding = 0;
    table14.cellSpacing = 0;
    table14.style.margin = '8px 0 0 0';
    td.appendChild(table14);
    
    tr14 = table14.insertRow(-1);
    td14 = tr14.insertCell(-1);
    td14.align = 'left';
    td14.style.width = '120px';
    td14.style.verticalAlign = 'middle';
    td14.style.height = '30px';
    td14.style.fontSize = '130%';
    td14.style.fontWeight = 'bold';
    td14.style.color = '#663333';
    td14.appendChild(document.createTextNode('Note'));
    
    td14 = tr14.insertCell(-1);
    td14.align = 'left';
    td14.style.width = '740px';
    td14.style.verticalAlign = 'middle';
    td14.style.height = '30px';
    var div = document.createElement('div');
    div.style.width = '740px';
    div.style.wordWrap = 'break-word';
    div.id = unique + '_' + i + '_note_div';
    td14.appendChild(div);
    
    if (i < this._orderTrackId.length -1) {
      tr = table.insertRow(-1);
      td = tr.insertCell(-1);
      td.align = 'left';
      td.style.verticalAlign = 'middle';
      td.style.width = '900px';
      td.style.height = '28px';
      var table12 = document.createElement('table');
      table12.style.width = '900px';
      table12.style.height = '28px';
      table12.cellPadding = 0;
      table12.cellSpacing = 0;
      td.appendChild(table12);
 
      tr12 = table12.insertRow(-1);
      td12 = tr12.insertCell(-1);
      td12.align = 'left';
      td12.style.verticalAlign = 'top';
      td12.style.height = '28px';
      var line = document.createElement('img');
      line.src = 'images/common/line.png';
      td12.appendChild(line);
      
    }
  }
  var gui = GuiContainerContract.instance(unique, this._orderTrackId);
  new HandleContainerContract(gui, this._item, this._options);
};
